package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingProjectDto;
import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface NursingProjectMapper {
    Page<NursingProjectVo> getBypage(@Param("name") String name, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("status") Integer status);

    void insert(NursingProjectDto dto);

    NursingProjectVo getById(Long  id);

    void updateById(NursingProject bean);

    @Update("update nursing_project set status=#{status} where id=#{id}")
    void updateStatus(long id, Integer status);

    @Delete("delete  from nursing_project where id=#{id}")
    void deleteById(Long id);

    @Select("select * from nursing_project")
    List<NursingProjectVo> list();
}
